package com.spice.service.entity.pojo;

import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.spice.common.constant.PermissionConstant;
import com.spice.common.model.BaseEntity;
import com.spice.common.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(PermissionConstant.SHAPE_DESC)
@ApiModel(description = "辣椒外形描述表")
public class ShapeDesc extends BaseEntity {
    @ApiModelProperty(value = "名称", example = "1")
    @ExcelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "外形", example = "长条形，干燥饱满，无梗无蒂籽多，暗红色，夹杂黄色，色度不均匀")
    @ExcelProperty(value = "外形")
    private String shape;

    @ApiModelProperty(value = "维护人", example = "张三")
    @ExcelProperty(value = "维护人")
    private String maintainer;

    @ApiModelProperty(value = "维护时间", example = "2021-06-28 20:48:20")
    @ExcelProperty(value = "维护时间（系统注入）")
    private String maintainTime;


    @ApiModelProperty(value = "图片", example = "辣椒图片")
    @ExcelProperty(value = "图片地址")
    private String picture;

    @Override
    public ShapeDesc cleanup() {
        super.cleanup();
        this.setMaintainTime(DateUtil.getNowDateTime());
        return this;
    }
}
